--- 模块功能：自动注册任务.
-- @author zhangFenghe
-- @module Tweeter.registerAutoTask
-- @license MIT
-- @copyright zhangFenghe
-- @release 2022.12.06
module(..., package.seeall) -- 使得文件中的函数在何处都可调用

require "nvm"
require "log"
require "registerTask"

nvm.init("config.lua", true)

local clientId, regCenter = nvm.get("centerConfig")[6], nvm.get("regCenter")

function autoRegister()
    log.info("自动注册任务！！")
    log.info("regCenter",regCenter,"clientId",clientId)
    if regCenter == true and clientId == nil then
        log.info("regCenter",regCenter,"clientId",clientId)
        log.info("zi动注册")
        registerTask.RegistrationServiceTask()
    end
end
autoRegister()
